
<!DOCTYPE html>
<html  lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>新疆财经大学党课学习平台</title>
    <link href="../static/css/main.css" th:href="@{/css/main.css}" rel="stylesheet"/>
    <link href="../static/css/common.css" th:href="@{/css/common.css}" rel="stylesheet"/>
    <link href="../static/css/djyun.css" th:href="@{/css/djyun.css}" rel="stylesheet"/>
</head>

<body class="djyun_bg">
<div id="sm_header">
    <div class="bannerImg_auto">
        <div class="banner_h380">
            <h2>新疆财经大学党课学习平台</h2>
        </div>
    </div>
</div>
<div id="sm_center" class="container_1200">
    <div class="contain_djBooks">
        <h4 class="tgTitle"><strong>基础党课</strong></h4>
        <ul class="djbook_list" id="course_list">
            <!--<li>
                <div class="bCover"><a href="/wk/index.htm?id=29"><img src="http://file.attop.com/img/wk/15070216015600805857_240.jpg" width="190" height="140" /></a></div>
                <div class="bInfo">
                    <a class="btnGreen_check" href="/wk/index.htm?id=29">进入课程</a>
                    <h6><a href="/wk/index.htm?id=29">中国共产党简史</a></h6>
                    <p><label>主讲老师：</label><a href="/u/100023" target="_blank">王文余</a></p>
                    <p><label>学习天数：</label>100天</p>
                    <p><label>选课人数：</label>1844人</p>
                    <p><label>结业人数：</label>1809人</p>
                </div>
                <div class="clear"></div>
            </li>
            <li>
                <div class="bCover"><a href="/wk/index.htm?id=30"><img src="http://file.attop.com/img/wk/15070215370500760407_240.jpg" width="190" height="140" /></a></div>
                <div class="bInfo">
                    <a class="btnGreen_check" href="/wk/index.htm?id=30">进入课程</a>
                    <h6><a href="/wk/index.htm?id=30">党课教程</a></h6>
                    <p><label>主讲老师：</label><a href="/u/100023" target="_blank">王文余</a></p>
                    <p><label>学习天数：</label>100天</p>
                    <p><label>选课人数：</label>1199人</p>
                    <p><label>结业人数：</label>1190人</p>
                </div>
                <div class="clear"></div>
            </li>
            <li>
                <div class="bCover"><a href="/wk/index.htm?id=31"><img src="http://file.attop.com/img/wk/15070211174200701826_240.jpg" width="190" height="140" /></a></div>
                <div class="bInfo">
                    <a class="btnGreen_check" href="/wk/index.htm?id=31">进入课程</a>
                    <h6><a href="/wk/index.htm?id=31">中国共产党章程</a></h6>
                    <p><label>主讲老师：</label><a href="/u/100023" target="_blank">王文余</a></p>
                    <p><label>学习天数：</label>100天</p>
                    <p><label>选课人数：</label>1716人</p>
                    <p><label>结业人数：</label>1705人</p>
                </div>
                <div class="clear"></div>
            </li>-->
        </ul>
    </div>
    <div class="contain_djBooks">
        <h4 class="tgTitle"><strong>党课考试</strong></h4>
        <ul class="djbook_list" id="testlist">
            <!--<li>
                <div class="bCover"><a href="/wk/index.htm?id=31"><img src="http://file.attop.com/img/b0003/13102515154403137837.png" width="190" height="140" /></a></div>
                <div class="bInfo">
                    &lt;!&ndash; <a class="btnGreen_check" href="/wk/index.htm?id=31">进入课程</a>&ndash;&gt;
                    <h6><a href="/wk/index.htm?id=31">12月考试</a></h6>
                    <p><label>考试时间：</label>2019-11-20 12:36:42</p>
                    <p><label>考试成绩：</label>80</p>
                    &lt;!&ndash;<p><label>选课人数：</label>1716人</p>
                    <p><label>结业人数：</label>1705人</p>&ndash;&gt;
                </div>
                <div class="clear"></div>
            </li>-->
           <!-- <li>
                <div class="bCover"><img src="/profile//upload//2019/11/25/2414c8cbe4c6c993dbcc1e0b1083bb34.jpg" width="190" height="140"></div>
                    <div class="bInfo">
                        <h6>党的历史</h6>
                        <a class="btn btn-success btn-xs btnGreen_check" href="javascript:void(0)" onclick="detail(&quot;7&quot;,&quot;党的历史&quot;)">
                            <i class="fa fa-edit"></i>进入课程</a>
                        <p><label>创建时间：</label> 2019-11-20 12:36:42</p>
                    </div>
                <div class="clear">/div>
            </li>


            <li>
                <div class="bCover"><img src="http://file.attop.com/img/b0003/13102515154403137837.png" width="190" height="140" /></div>
                <div class="bInfo">
                    <h6>11月考试</a></h6>
                    <a class="btn btn-success btn-xs btnGreen_check" href="javascript:void(0)" cid="3" cname="视频课程测试" onclick="testP()">
                        <i class="fa fa-edit"></i>我要补考</a>

                    <p><label>考试时间：</label>无</p>
                    <p><label>考试成绩：</label>0</p>


                    &lt;!&ndash;<h6><a href="/wk/index.htm?id=31">我要补考</a></h6>&ndash;&gt;
                    &lt;!&ndash;<p><label>选课人数：</label>1716人</p>
                    <p><label>结业人数：</label>1705人</p>&ndash;&gt;
                </div>
                <div class="clear"></div>
            </li>-->
        </ul>
    </div>
    <div class="contain_djBooks">
        <h4 class="tgTitle"><strong>党课学习流程</strong></h4>
        <div class="text-intro">
            <p>1. 在党课学习平台中，请选择需要学习的党课，党课分为文本与视频课程。</p>
            <p>2. 点击页面我要考试，即可进入考试页面</p>
            <!--<p>3.徽章领取：三门课程修满后，请自行手动结业，结业后点击党课知识徽章，在跳转页面申领基础党课徽章，徽章申请条件为三门课程均达到100分。<br>基础党课徽章领取：http://www.attop.com/dot/hz/index.htm?no=B0003</p>
            <p>4. 申领徽章成功后，请点击徽章图标下的“查看证书”按钮，进入证书展示页面，请将个人的证书展示页面网址复制给学校相关管理员。</p>
            <p>5. 学校管理员通过用户提交的基础党课学习徽章链接，检查、记录用户的党课学习情况。</p>-->
        </div>
    </div>
</div>
<th:block th:include="include :: footer" />
<!--<div class="copyRight">
    <div class="container_1200">Copyright &copy; 2019 新疆财经大学 版权所有 <a href="http://www.beian.miit.gov.cn" target="_blank">渝ICP备11006229号</a> &nbsp; <a target="_blank" href="http://www.beian.gov.cn/portal/registerSystemInfo?recordcode=50010902000113"><img src="/images/ghs.png"/>渝公网安备 50010902000113号</a></div>
</div>-->
<div class="bell-notice" style="display:none"><a href="/user/mytask.htm"></a></div>

<script th:inline="javascript">
    var prefix = ctx + "self/course";
    var prefix2 = ctx + "self/testrecord";


    $(function() {
        var innerHtml = "";
        var formData = new FormData();
        formData.append("cstatus","0");
        $.ajax({
            url: prefix + "/list2",
            type: 'post',
            cache: false,
            data: formData,
            processData: false,
            contentType: false,
            dataType: "json",
            success: function(result) {
                console.log(result);
                $.each(result,function(i,n) {
                    /*console.log("data sid is: ", n.sid);
                     console.log("data sname is: ", n.sname);*/
                    innerHtml += "<li>";
                    innerHtml += ("<div class='bCover'><img src=" + n.cimg + " width='190' height='140' /></div>");
                    innerHtml += (" <div class='bInfo'>");

                    innerHtml += ("<h6>" + n.cname +"</h6>");
                    innerHtml += ("<a class='btn btn-success btn-xs btnGreen_check' href='javascript:void(0)' onclick='detail(\"" + n.cid +  "\",\"" +  n.cname + "\")'><i class='fa fa-edit'></i>进入课程</a>");
                    /*innerHtml += ("<p><label>学习人数：</label> " + 100  + "</p>");*/
                    innerHtml += ("<p><label>创建时间：</label> " + n.createdata  + "</p>");
                    innerHtml += (" </div>");
                    innerHtml += ("<div class='clear'></div>");
                    innerHtml += "</li>";
                });
                $("#course_list").html(innerHtml);
            }
        });
    });

    //查询考试记录
    $(function() {
        var innerHtml = "";
        var formData = new FormData();
        var loginName =[[${@permission.getPrincipalProperty('loginName')}]];
        console.log("loginName",loginName);
        //return;
        formData.append("loginName",loginName);
        var date = new Date();
        var newmonth = date.getMonth() + 1;
        var testType = "";
        var testTypeName= "";
        $.ajax({
            url: prefix2 + "/list2",
            type: 'post',
            cache: false,
            data: formData,
            processData: false,
            contentType: false,
            dataType: "json",
            success: function(result) {
                console.log(result);
                $.each(result,function(i,n) {
                    /*console.log("data sid is: ", n.sid);
                    console.log("data sname is: ", n.sname);*/
                    innerHtml += "<li>";
                    innerHtml += ("<div class='bCover'><img src='http://file.attop.com/img/b0003/13102515154403137837.png' width='190' height='140' /></div>");
                    innerHtml += (" <div class='bInfo'>");

                    innerHtml += ("<h6>" + n.testMonth +"月考试</h6>");
                    if (n.testType == null || n.testType == "") {
                        innerHtml += ("<p><label>考试时间：</label>无</p>");
                        if (n.testMonth == newmonth){
                            testType = "0";
                            testTypeName = "我要考试";
                            innerHtml += ("<a class='btn btn-success btn-xs btnGreen_check' href='javascript:void(0)' onclick='testP(\"" + n.id +  "\",\"" +  testType + "\")'><i class='fa fa-edit'></i>" + testTypeName + "</a>");
                        } else {
                            testType = "1";
                            testTypeName = "我要补考";
                            innerHtml += ("<a class='btn btn-success btn-xs btnDanger_check' href='javascript:void(0)' onclick='testP(\"" + n.id +  "\",\"" +  testType + "\")'><i class='fa fa-edit'></i>" + testTypeName + "</a>");
                        }

                    } else {
                        innerHtml += ("<p><label>考试时间：</label> " + n.oprTime  + "</p>");
                    }
                    innerHtml += ("<p><label>考试分数：</label> " + n.score  + "</p>");
                    innerHtml += (" </div>");
                    innerHtml += ("<div class='clear'></div>");
                    innerHtml += "</li>";
                });
                $("#testlist").html(innerHtml);
            }
        });
    });



    /*课程-详细*/
    function detail(cid,cname) {
        var url = prefix + '/detail/' + cid;
        $.modal.openTab(cname, url);
    }

    /*考试-详细*/
    function testP(id,testType) {
        var url = ctx + 'self/test' + '/profile/' +  id + '/' + testType;
        var cname = "党课考试";
        $.modal.openTab(cname, url);
    }
</script>
</body>
</html>